package com.dlc.shop.systemtest.data.amount;

import com.dlc.shop.bean.app.param.OrderItemParam;
import com.dlc.shop.bean.model.Product;
import com.dlc.shop.systemtest.api.amount.ProductApi;

/**
 * @author lanhai
 * 订单项测试数据
 */
public class OrderItemData {

    public static OrderItemParam getOrderItemParam(Long prodId, Integer prodCount){
        OrderItemParam orderItemParam = new OrderItemParam();
        orderItemParam.setProdId(prodId);
        orderItemParam.setComboId(null);
        orderItemParam.setProdCount(prodCount);
        Product productInfo = ProductApi.getProductInfo(prodId);
        orderItemParam.setSkuId(productInfo.getSkuList().get(0).getSkuId());
        orderItemParam.setShopId(productInfo.getShopId());
        return orderItemParam;
    }

}
